.class public Lcom/waiqin365/lightapp/kehu/a/a/au;
.super Lcom/waiqin365/lightapp/kehu/a/d;


# instance fields
.field public d:Ljava/lang/String;

.field public e:Ljava/lang/String;

.field public f:Ljava/util/ArrayList;

.field public g:Ljava/util/ArrayList;


# direct methods
.method public constructor <init>()V
    .locals 1

    const/16 v0, 0x79

    invoke-direct {p0, v0}, Lcom/waiqin365/lightapp/kehu/a/d;-><init>(I)V

    return-void
.end method


# virtual methods
.method public a(Ljava/lang/String;)Z
    .locals 8

    const/4 v0, 0x1

    const/4 v1, 0x0

    :try_start_0
    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string/jumbo v3, "code"

    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    iput-object v3, p0, Lcom/waiqin365/lightapp/kehu/a/a/au;->d:Ljava/lang/String;

    const-string/jumbo v3, "message"

    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    iput-object v3, p0, Lcom/waiqin365/lightapp/kehu/a/a/au;->e:Ljava/lang/String;

    const-string/jumbo v3, "data"

    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v2

    if-eqz v2, :cond_1

    const-string/jumbo v3, "unselect_fields"

    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v3

    const-string/jumbo v4, "selected_fields"

    invoke-virtual {v2, v4}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v4

    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    iput-object v2, p0, Lcom/waiqin365/lightapp/kehu/a/a/au;->f:Ljava/util/ArrayList;

    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    iput-object v2, p0, Lcom/waiqin365/lightapp/kehu/a/a/au;->g:Ljava/util/ArrayList;

    move v2, v1

    :goto_0
    if-eqz v3, :cond_0

    invoke-virtual {v3}, Lorg/json/JSONArray;->length()I

    move-result v5

    if-ge v2, v5, :cond_0

    invoke-virtual {v3, v2}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v5

    new-instance v6, Lcom/waiqin365/lightapp/kehu/b/bl;

    invoke-direct {v6}, Lcom/waiqin365/lightapp/kehu/b/bl;-><init>()V

    const-string/jumbo v7, "field_type"

    invoke-virtual {v5, v7}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    iput-object v7, v6, Lcom/waiqin365/lightapp/kehu/b/bl;->a:Ljava/lang/String;

    const-string/jumbo v7, "code"

    invoke-virtual {v5, v7}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    iput-object v7, v6, Lcom/waiqin365/lightapp/kehu/b/bl;->e:Ljava/lang/String;

    const-string/jumbo v7, "value"

    invoke-virtual {v5, v7}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    iput-object v7, v6, Lcom/waiqin365/lightapp/kehu/b/bl;->b:Ljava/lang/String;

    const-string/jumbo v7, "select_item"

    invoke-virtual {v5, v7}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    iput-object v7, v6, Lcom/waiqin365/lightapp/kehu/b/bl;->c:Ljava/lang/String;

    const-string/jumbo v7, "label"

    invoke-virtual {v5, v7}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    iput-object v5, v6, Lcom/waiqin365/lightapp/kehu/b/bl;->d:Ljava/lang/String;

    const/4 v5, 0x0

    iput v5, v6, Lcom/waiqin365/lightapp/kehu/b/bl;->g:I

    iget-object v5, p0, Lcom/waiqin365/lightapp/kehu/a/a/au;->f:Ljava/util/ArrayList;

    invoke-virtual {v5, v6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_0
    move v2, v1

    :goto_1
    if-eqz v4, :cond_1

    invoke-virtual {v4}, Lorg/json/JSONArray;->length()I

    move-result v3

    if-ge v2, v3, :cond_1

    invoke-virtual {v4, v2}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v3

    new-instance v5, Lcom/waiqin365/lightapp/kehu/b/bl;

    invoke-direct {v5}, Lcom/waiqin365/lightapp/kehu/b/bl;-><init>()V

    const-string/jumbo v6, "field_type"

    invoke-virtual {v3, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v5, Lcom/waiqin365/lightapp/kehu/b/bl;->a:Ljava/lang/String;

    const-string/jumbo v6, "code"

    invoke-virtual {v3, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v5, Lcom/waiqin365/lightapp/kehu/b/bl;->e:Ljava/lang/String;

    const-string/jumbo v6, "value"

    invoke-virtual {v3, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v5, Lcom/waiqin365/lightapp/kehu/b/bl;->b:Ljava/lang/String;

    const-string/jumbo v6, "select_item"

    invoke-virtual {v3, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v5, Lcom/waiqin365/lightapp/kehu/b/bl;->c:Ljava/lang/String;

    const-string/jumbo v6, "label"

    invoke-virtual {v3, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    iput-object v3, v5, Lcom/waiqin365/lightapp/kehu/b/bl;->d:Ljava/lang/String;

    const/4 v3, 0x1

    iput v3, v5, Lcom/waiqin365/lightapp/kehu/b/bl;->g:I

    iget-object v3, p0, Lcom/waiqin365/lightapp/kehu/a/a/au;->g:Ljava/util/ArrayList;

    invoke-virtual {v3, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    add-int/lit8 v2, v2, 0x1

    goto :goto_1

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    move v0, v1

    :cond_1
    return v0
.end method
